package com.jmebananas.renderer.pass;

import java.util.Comparator;

import com.jme.renderer.pass.Pass;

/**
 * PassComparator
 * 
 * @author Glenn Powell
 *
 */
public class PassComparator implements Comparator<Pass> {

	public int compare(Pass arg0, Pass arg1) {
		if (arg0 instanceof AdvancedRenderPass && arg1 instanceof AdvancedRenderPass) {
			AdvancedRenderPass pass0 = (AdvancedRenderPass)arg0;
			AdvancedRenderPass pass1 = (AdvancedRenderPass)arg1;
			return pass0.getIndex() - pass1.getIndex();
		}
		return 0;
	}

}
